// Names of all attributes offered by any model
// Copyright 2004 (C) Ralph Thomas

#ifndef MODEL_ATTRIBUTE_NAMES_H
#define MODEL_ATTRIBUTE_NAMES_H

namespace model {
	//
	/// All attributes have names, and all attribute names are
	/// defined in this big enum.
	//
	//
	/// kUrl : std::string
	///
	/// The canonical URL which this model is representing.
	//
	extern const char* kUrl;
	//
	/// kModelValid : bool
	///
	/// Clients can use the kModelValid attribute to verify
	/// that a model is valid (that is, it points to a resource
	/// which actually exists). When a model client recieves a
	/// notification that kModelValid has changed, it normally
	/// means that the model is no longer valid. If this happens
	/// then the model should be released as soon as possible.
	///
	/// The string of this name is "model_valid".
	//
	extern const char* kModelValid;
	//
	/// kModelAttributes : attributeInfo (see model/attributeInfo.h)
	///
	/// This attribute is always read-only, and returns a random-
	/// -access iterator which details all of the attributes
	/// supported by this model, and if they are read-only or not.
	///
	/// The string of this name is "model_attributes".
	//
	extern const char* kModelAttributes;
	//
	/// kChildren : urlCollection (see model/collection.h)
	///
	/// This attribute is for a random-access iterator (not the STL
	/// kind). When a model's number of children changes (i.e.: a
	/// child is added or removed) this notification is sent.
	///
	/// The string of this name is "children".
	//
	extern const char* kChildren;
	//
	/// kName : util::string
	///
	/// This attribute will get or set the name of a model. Note
	/// that setting a model's name is actually "renaming" the
	/// resource to which the model points.
	///
	/// The string of this name is "name".
	//
	extern const char* kName;
	//
	/// kType : util::string
	///
	/// This attribute will get the MIME type of a model. Some
	/// mission models have non-standard MIME types starting
	/// "x-mission/".
	///
	/// The string of this name is "type".
	//
	extern const char* kType;
	//
	/// kModifiedDate : unsigned int
	///
	/// This attribute will get the last modified date (in UNIX
	/// time) of a model.
	///
	/// The string of this name is "modified_date".
	//
	extern const char* kModifiedDate;
	//
	/// kFrom : util::string
	///
	/// This attribute is typically used to denote the sender of an
	/// email message.
	///
	/// The string of this name is "from".
	//
	extern const char* kFrom;
	//
	/// kData : util::string
	///
	/// This attribute is used to return text data from a model. It
	/// will likely change or be removed in the future -- currently
	/// we use it to get the text parts from parts of messages on
	/// IMAP servers.
	///
	/// The string of this name is "data".
	//
	extern const char* kData;
	//
	/// kParent : util::string (a URL)
	///
	/// This attribute is used to return the URL of the parent
	/// model. If there is no parent model then an empty string
	/// is returned.
	///
	/// The string of this name is "parent".
	//
	extern const char* kParent;
	//
	/// kError : unsigned int (an error code, known to i18n)
	///
	/// This attribute is used to return the error code of something
	/// which caused the model to become invalid. It can be
	/// converted to natural language by internationalization
	/// (in the kModelError catalog).
	///
	/// The string of this name is "error".
	//
	extern const char* kError;
	//
	/// kSize : unsigned int (number of bytes)
	///
	/// This attribute is used to return the size (in bytes) of the
	/// resource which the model represents.
	///
	/// The string of this name is "size".
	//
	extern const char* kSize;
	//
	/// kIcon : <system icon format>
	///
	/// This attribute returns the model's desired icon when being
	/// drawn in any view with icons.
	///
	/// The string of this name is "icon".
	//
	extern const char* kIcon;
	//
	/// kView : std::string (an Eve description)
	///
	/// This attribute returns a string containing an Eve
	/// description of the view window.
	///
	/// The string of this name is "view".
	//
	extern const char* kView;
	//
	/// kSheet : adobe::sheet_t*
	///
	/// This attribute always returns a new sheet which matches the
	/// view given by kView.
	///
	/// The string of this name is "sheet".
	//
	extern const char* kSheet;
	//
	/// kExtAttrPrefix : std::string
	///
	/// This is the prefix given to all extended attributes. It is
	/// used by the models to determine what is an extended attribute.
	/// All extended attributes MUST begin with this string.
	//
	extern const char* kExtAttrPrefix;
	//
	/// kSortBy : std::string
	///
	/// The name of the attribute to sort the list of children by.
	//
	extern const char* kSortBy;
	//
	/// kStreamBuf : boost::shared_ptr<std::streambuf>
	///
	/// Similar to kData; some views support viewing the data in a
	/// file using a streambuf. This generally makes things much
	/// faster.
	//
	extern const char* kStreamBuf;
};

#endif

